package com.supergdtop.www.run.activity.designer;

import android.content.Context;
import android.content.Intent;
import android.provider.Settings;

import com.asum.xuidesign.interfaces.IUIDesigner;
import com.asum.xuidesign.utils.XDesigner;
import com.supergdtop.www.run.finaldata.Global;
import com.supergdtop.www.run.tools.ScreenSizeTools;


/**
 * Activity设计基类
 * Created by Asum on 2016/5/31 0031.
 */
public abstract class ActivityDesigner implements IUIDesigner {
    public Context context;
    public XDesigner designer;
    public int screenW, screenH;
    public int padding;
    public double space;

    public void design(XDesigner designer, Intent intent) {
        this.designer = designer;
        context = designer.getContext();
        screenW = ScreenSizeTools.getW(context);
        screenH = ScreenSizeTools.getH(context);
        padding = Global.padding(context);
        space = Global.space(context);

        design(intent);
        getWidgets();
        setWidgets();
    }

    public void design(XDesigner designer, Object... values) {
    }

    protected abstract void design(Intent intent);

    protected abstract void getWidgets();

    protected abstract void setWidgets();
}
